import  {createI18n} from  "vue-i18n"
import  en from  "./config/en";
import  zh from  "./config/zh";

localStorage.getItem("lang") || localStorage.setItem("lang", "zh") 
const  i18n  =  createI18n({
    locale:localStorage.getItem("lang"),
    messages:{
        zh,
        en
    },
    fallbackLocale: 'zh',
    legacy:false,   // legacy:false, //用于区分是否使用组合式api，v3使用要设为false 
})
export  default  i18n;